import VueRouter from "vue-router";


export default new VueRouter({
    duplicateNavigationPolicy: 'ignore',
    routes:[
        {
            path: '/',
            component:()=>import('../views/loginView.vue'),
        },
        {
            path: '/index',
            component:()=>import('../views/index.vue'),
            redirect: '/home',
            children: [
                {
                    path: '/home',  // 岗位列表
                    name: 'home',
                    component:() =>import('../views/home/homeView.vue')

                },
                {
                    path: '/jobs',  // 岗位列表
                    name: 'jobs',
                    component:() =>import('../views/job/jobView.vue')
                },
                {
                    path: '/resume',  // 简历列表
                    name: 'resume',
                    component:() =>import('../views/resume/ResumeView.vue')
                },
                {
                    path: '/learning',  // 学习列表
                    name: 'learning',
                    component:() =>import('../views/video/VideoView.vue')
                },
                {
                    path: '/my',  // 我的
                    name: 'my',
                    component:() =>import('../views/my/MyPageView.vue')
                }
            ]
        },
        {
            path: '/company',
            component:()=>import('../views/company/companyHome.vue'),
            children:[
                {
                    path: 'announceJobs',
                    name: 'announceJobs',
                    component:()=>import('../components/company/announceJobs.vue')
                },
                {
                    path: 'jobList',
                    name: 'jobList',
                    component:()=>import('../components/company/jobList.vue')
                },
                {
                    path: 'companyInfo',
                    name: 'companyInfo',
                    component:()=>import('../components/company/companyInfo.vue')
                },
                {
                    path: 'companyStatistics',
                    name: 'companyStatistics',
                    component:()=>import('../components/company/companyStatistics.vue')
                },
                {
                    path: 'auditResumes',
                    name: 'auditResumes',
                    component:()=>import('../components/company/auditResumes.vue')
                },
                {
                    path: 'historicalResume',
                    name: 'historicalResume',
                    component:()=>import('../components/company/historicalResume.vue')
                },
            ]

        },

        {// 管理员界面
            path: '/admin',
            component:()=>import('../views/admin/adminHome.vue'),
            children:[
                {
                    path: 'statistics',
                    name: 'statistics',
                    component:()=>import('../components/admin/statistics.vue')
                },
                {
                    path: 'auditCompanies',
                    name: 'auditCompanies',
                    component:()=>import('../components/admin/auditCompanies.vue')
                },
                {
                    path: 'spectCompany',
                    name: 'spectCompany',
                    component:()=>import('../components/admin/spectCompany.vue')
                },
                {
                    path: 'video',
                    name: 'video',
                    component:()=>import('../components/admin/VideoView.vue')
                },
                {
                    path: 'jobCategories',
                    name: 'jobCategories',
                    component:()=>import('../components/categories/CategoryManagement.vue')
                },


            ]

        },
        {
            path: '/login',
            name: 'login',
            component:()=>import('../views/loginView.vue')
        },

    ]

})
